﻿$(function () {
    var icons = $("i.icon-myimg");
    var on_nav_load = function () {
        for (var i = 0; i < icons.length; i++) {
            var note = $(icons[i]);
            note.css("background-position", note.attr('mouseover'));
        }
        var selenote = $(".ico-myimg-nav li.active i.icon-myimg");
        if (selenote) {
            selenote.css("background-position", selenote.attr('mouseout'));
        }
        $(".ico-myimg-nav li").not(".active").find("i.icon-myimg").mouseover(function(e) {
            var note = $(e.target);
            note.css("background-position", note.attr('mouseout'));
        });
        $(".ico-myimg-nav li").not(".active").find("a").mouseover(function(e) {
            var note = $(e.target).find("i.icon-myimg").not(".active");
            note.css("background-position", note.attr('mouseout'));
        });
        $(".ico-myimg-nav li").not(".active").find("a").mouseout(function(e) {
            var note = $(e.target).find("i.icon-myimg");
            note.css("background-position", note.attr('mouseover'));
        });
    };
    on_nav_load();
});